import { Field, Int, ObjectType } from "@nestjs/graphql";
import { Media } from "@prisma/client";
import { StudentEntity } from "src/student/student.entity";
import { WorkEntity } from "src/work/work.entity";


@ObjectType()
export class MediaEntity implements Media {

    @Field(() => Int)
    id: number;

    @Field()
    createAt: Date;

    @Field({ nullable: true })
    work?: WorkEntity

    @Field({ nullable: true })
    student?: StudentEntity

    @Field({ nullable: true })
    exists?: boolean

    workId: number;
    studentId: number;

}